package com.ecoolex.chinadutyfree.retailer.ws;

import java.util.List;

import com.ecoolex.chinadutyfree.retailer.entity.GoodsAfterService;
import com.ecoolex.chinadutyfree.retailer.entity.GoodsBarcode;
import com.ecoolex.chinadutyfree.retailer.entity.GoodsBrand;
import com.ecoolex.chinadutyfree.retailer.entity.GoodsCategory;
import com.ecoolex.chinadutyfree.retailer.entity.GoodsCategoryMarketing;
import com.ecoolex.chinadutyfree.retailer.entity.GoodsProduct;
import com.ecoolex.chinadutyfree.retailer.entity.GoodsShopwindow;
import com.ecoolex.chinadutyfree.retailer.entity.GoodsSpec;
import com.ecoolex.chinadutyfree.retailer.entity.GoodsSpecGroup;
import com.ecoolex.chinadutyfree.retailer.entity.GoodsWithBLOBs;
import com.ecoolex.chinadutyfree.retailer.pojo.EditSpecGroupDTO;
import com.ecoolex.chinadutyfree.retailer.pojo.GoodsCategoryTopChildDO;
import com.ecoolex.chinadutyfree.retailer.pojo.QueryGoodsCategoryDTO;
import com.ecoolex.chinadutyfree.retailer.pojo.QueryGoodsDTO;
import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;


public interface GoodsService {

	GoodsBrand addBrand(GoodsBrand record, String createUser) throws BizException;

	GoodsBrand updateBrand(GoodsBrand record, String updateUser) throws BizException;

	void deleteBrand(GoodsBrand record, String updateUser) throws BizException;

	GoodsBrand getBrandById(Integer brandId);

	Pagination<GoodsBrand> queryBrand(String name, Integer categoryId, Sorting[] sorts, Page page);
	
	Pagination<GoodsBrand> queryBrandForH5(String name, Page page);

	GoodsCategory addCategory(GoodsCategory record, String createUser) throws BizException;

	GoodsCategory updateCategory(GoodsCategory record, String updateUser) throws BizException;;

	void deleteCategory(GoodsCategory record, String updateUser) throws BizException;

	GoodsCategory getCategoryById(Integer categoryId);

	List<GoodsCategory> queryCategoryByParentId(Integer parentCategoryId, Boolean isShow);

	Pagination<GoodsCategory> queryCategory(QueryGoodsCategoryDTO query, Sorting[] sorts, Page page);

	GoodsCategory showCategory(GoodsCategory record, String updateUser);

	GoodsCategory hideCategory(GoodsCategory record, String updateUser);

	GoodsAfterService addAfterService(GoodsAfterService record, String createUser) throws BizException;

	GoodsAfterService editAfterService(GoodsAfterService record, String updateUser) throws BizException;

	void deleteAfterService(GoodsAfterService record, String updateUser) throws BizException;

	GoodsAfterService getAfterServiceById(Integer afterServiceId);

	Pagination<GoodsAfterService> queryAfterService(String name, Sorting[] sorts, Page page);

	GoodsWithBLOBs addGoods(GoodsWithBLOBs record, List<String> shopwindowList, List<EditSpecGroupDTO> specGroup, String createUser) throws BizException;

	GoodsWithBLOBs updateGoods(GoodsWithBLOBs record, List<String> shopwindowList, List<EditSpecGroupDTO> specGroup, String updateUser) throws BizException;

	void deleteGoods(GoodsWithBLOBs record, String updateUser) throws BizException;

	GoodsWithBLOBs getGoodsById(Integer goodsId);

	Pagination<GoodsWithBLOBs> queryGoods(QueryGoodsDTO query, Sorting[] sorts, Page page);

	List<GoodsShopwindow> queryGoodsShopwindowByGoodsId(Integer goodsId);

	List<GoodsSpecGroup> queryGoodsSpecGroupByGoodsId(Integer goodsId);

	List<GoodsSpec> queryGoodsSpecByGroupId(Integer groupId);

	List<GoodsProduct> queryGoodsProductByGoodsId(Integer goodsId);

	GoodsProduct updateGoodsProduct(GoodsProduct product, List<String> barcodeList, String updateUser) throws BizException;

	List<GoodsBarcode> queryGoodsBarcodeByProductId(Integer productId);

	GoodsProduct getGoodsProductById(Integer productId);

	Long sumStockNumberByGoodsId(Integer goodsId);

	Long sumUsedStockNumberByGoodsId(Integer goodsId);

	Long sumSoldNumberByGoodsId(Integer goodsId);
	
	Pagination<GoodsCategory> queryGoodsCategoryForH5(Integer level,Integer parentCategoryId,Sorting[] sorts, Page page);

	List<GoodsCategoryTopChildDO> queryGoodsCategoryTopChild(Integer minNumber, Integer size);

	GoodsCategoryMarketing addGoodsCategoryMarketing(GoodsCategoryMarketing record,String createUser) throws BizException;
	
	GoodsCategoryMarketing editGoodsCategoryMarketing(GoodsCategoryMarketing record,String updateUser) throws BizException;

	void deleteGoodsCategoryMarketing(GoodsCategoryMarketing record,String updateUser) throws BizException;
	
	GoodsCategoryMarketing getGoodsCategoryMarketing(Integer id);
	
	GoodsCategoryMarketing getGoodsCategoryMarketingByCategoryId(Integer categoryId);
	
	Pagination<GoodsCategoryMarketing> goodsCategoryMarketingList(String name,Sorting[] sorts, Page page);
	
	Pagination<GoodsCategoryMarketing> goodsCategoryMarketingListForH5(Page page);
	
	GoodsCategoryMarketing getGoodsCategoryMarketingForH5(Integer id);
	
	Long countDirectMailGoodsNumberByBrandId(Integer brandId);
}
